package com.fwx.java2025420;

import com.fwx.java2025420.controller.UserController;
import org.apache.catalina.core.ApplicationContext;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Configuration;

@SpringBootApplication
public class Java2025420Application {

    public static void main(String[] args) {
      ConfigurableApplicationContext context = SpringApplication.run(Java2025420Application.class, args);
       UserController userController = context.getBean(UserController.class);
       userController.user();
       UserController userController1 =(UserController)context.getBean("userController");
       System.out.println(userController);
       System.out.println(userController1);
    }
}
